const express = require('express');
const router = express.Router();
const infoHandler = require('../router_handler/userinfo');
const expressJoi = require('@escook/express-joi');
const { update_info_schema ,update_password_schema,update_avatar_schema} = require('../schema/user');

router.get('/userinfo', infoHandler.info);

router.post('/userinfo', expressJoi(update_info_schema), infoHandler.update);

router.post('/updatepwd', expressJoi(update_password_schema), infoHandler.uppwd);

router.post('/update/avatar',expressJoi(update_avatar_schema), infoHandler.upavatar);

module.exports = router;